<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
		<title></title>
		<style type="text/css">
			body, html,#allmap {
				width: 100%;
				height: 100%;
				overflow: hidden;
				margin:0;
			}
			#l-map { 
				height:100%;
				width:78%;
				float:right;
				border-right:2px solid #bcbcbc;
			}
			#r-result {
				height:100%;
				width:20%;
				float:left;}
		</style>
		<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=uQmooGG28qG9xGH9BjXOuPkc"></script>
	</head>

	<body>
		<div id="allmap"></div>
	</body>
</html>

<script type="text/javascript">
	var map = new BMap.Map("allmap");  
	map.centerAndZoom(new BMap.Point(118.868937,32.030450), 19);
	map.enableScrollWheelZoom();
	map.addControl(new BMap.NavigationControl());                                 
	map.addControl(new BMap.OverviewMapControl());
	map.addControl(new BMap.ScaleControl());                                       
	map.addControl(new BMap.MapTypeControl());
	var lon = "";
	var lat = "";

	function onDrawLine(j, w)
	{
		if(lon != "")
		{
			var pointA = new BMap.Point(lon,lat);
			var pointB = new BMap.Point(j,w);
			var polyline = new BMap.Polyline([pointA,pointB], {strokeColor:"red", strokeWeight:6, strokeOpacity:0.5});
			map.addOverlay(polyline);
		}
		lon = j;
		lat = w;
	}
</script>